function varargout = set_station_scene(varargin)
%SAT 输入参数，输出星座场景
%   此处显示详细说明
global sc
    switch nargin
        case 1
            % earth = referenceEllipsoid('wgs84');
            % 设置每10°一个测站的间隔
            angleInterval = varargin{1};           
            % 创建经度和纬度的网格点
            [station_lon, lat] = meshgrid(-180:angleInterval:180, -85:angleInterval:85);    
            % 将经度和纬度转换为地理坐标
            % [x, y, z] = geodetic2ecef(earth, lat, station_lon, 0);
            for i = 1:length(station_lon)
                groundStation(sc,lat(:,i),station_lon(:,i)) ;% sc、纬度、精度（度）
            end
            groundStation(sc,[90,-90],[0,0]); % sc、纬度、精度（度）
            station = sc.GroundStations;
            station_size = length(station);
            jieguo = my_station(station',varargin{2});
            varargout{1} = jieguo;
            disp('全球测站建立完毕');
            disp("测站网点间隔："+num2str(angleInterval));
            disp("测站个数："+num2str(station_size));
        case 3
            station = groundStation(sc,varargin{1},varargin{2}) ;
            jieguo = my_station(station',varargin{3});
            varargout{1} = jieguo;
            disp('测站建立完毕');
        otherwise
            error("输入参数个数不对，支持1个参数（全球建站间隔）和两个参数（纬度、经度向量）...");
    end
end
